﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace QLNhaThuoc
{
    public partial class Form_ConfigSqlServer : Form
    {
        public Form_ConfigSqlServer()
        {
            InitializeComponent();
        }

        private string _databaseName;
        private void btOK_Click(object sender, EventArgs e)
        {
            _databaseName = tbDatabase.Text;
            Close();
        }

        public string GetConnectionString()
        {
            if (!string.IsNullOrEmpty(_databaseName))
                return "Provider=SQLOLEDB.1;Data Source=.;Integrated Security=SSPI;Initial Catalog=" + _databaseName;

            return "";
        }
    }
}
